package org.jsbd.boss.dao.impl;

import org.jsbd.boss.dao.IMiguUsefulConfigDao;
import org.jsbd.boss.domian.channel.MiguUsefulConfig;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @desc
 * @Date 2018/4/21 11:07
 * @Author xupengcheng [xupengcheng@zhexinit.com]
 */
@Service
public class MiguUsefulConfigDaoImpl extends CrackBaseDao implements IMiguUsefulConfigDao {

    @Override
    public void insertConfig(MiguUsefulConfig config) {
        super.insert("qy_migu_useful_config.INSERT_CONFIG", config);
    }

    @Override
    public void deleteConfig(MiguUsefulConfig config) {
        super.delete("qy_migu_useful_config.DELETE_CONFIG",config);
    }

    @Override
    public void updateConfig(MiguUsefulConfig config) {
        super.update("qy_migu_useful_config.UPDATE_CONFIG",config);
    }

    @Override
    public List<MiguUsefulConfig> selectList(MiguUsefulConfig config) {
        return super.queryForList("qy_migu_useful_config.SELECT_LIST", config);
    }

    @Override
    public MiguUsefulConfig selectConfig(MiguUsefulConfig config) {
        return (MiguUsefulConfig) super.queryForObject("qy_migu_useful_config.SELECT_CONFIG", config.getId());
    }

    @Override
    public Integer countOfConfig(MiguUsefulConfig config) {
        return super.queryForCount("qy_migu_useful_config.COUNT_LIST", config);
    }
}
